package com.example.android;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.widget.Toast;

public class RoadDownloadService extends Service {
    private static final String TAG = "dizuo";
    
    private RoadDownloader mDownload; 
    
    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }
    
    @Override
    public void onCreate() {
        Toast.makeText(this, "RoadDownloadService create", Toast.LENGTH_LONG).show();
        
        mDownload = new RoadDownloader();
    }

    @Override
    public void onDestroy() {
        Toast.makeText(this, "RoadDownloadService destroy", Toast.LENGTH_LONG).show();
        
        mDownload.stop();
    }
    
    @Override
    public void onStart(Intent intent, int startid) {
        Toast.makeText(this, "RoadDownloadService start", Toast.LENGTH_LONG).show();
       
        mDownload.start();
    }
}
